<?php
if (defined(ABSPATH)) {
    require_once(ABSPATH . "modules/admin-head.inc.php");
} else {
    define("ABSPATH", $_SERVER['DOCUMENT_ROOT'] . "/");
    require_once(ABSPATH . "modules/admin-head.inc.php");
}
// Ajax section
$xajax = new xajax();
$xajax->registerFunction("checkAll");
$xajax->registerFunction("checkAllRole");
$xajax->registerFunction("selectAllRole");
$xajax->registerFunction("checkGeneralForm");
$xajax->registerFunction("jsSubmitForm");
// $xajax->debugOn();
$xajax->processRequests();
// Include the header file
require_once(ABSPATH . "includes/admin-header.html");
require_once(ABSPATH . "modules/admin-menu.inc.php");
// Include the role file
require_once(ABSPATH . "modules/role.inc.php");
// Init user grid
$grid = initRoleGrid();
switch ($_GET['action']) {
    case 'edit_role':
        require_once(ABSPATH . "modules/edit_role.inc.php");
        break;
    case 'view_role': ;
        break;
    default:
        require_once(ABSPATH . "modules/view_record.inc.php");
        if ($grid->bAdd) {
            require_once(ABSPATH . "modules/add_role.inc.php");
        } ;
        break;
}
// Include thr footer to complete the template
require_once(ABSPATH . 'includes/footer.php');

?>